home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / Framewrk / FWPart / Include / FWPrtIte.h < prev    next >
Encoding:
Text File  |  1996-04-25  |  5.5 KB  |  195 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWPrtIte.h
  4. //    Release Version:    $ ODF 1 $
  5. //
  6. //    Copyright:            (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9. //
  10. //    This file contains the iterators on a part defined by ODF .
  11. //
  12. //        - FW_CPartFrameIterator
  13. //            Iterates through all the display frames of your part for a specific
  14. //            presentation. If kNoPresentation is used, all the display frames are returned.
  15. //
  16. //        - FW_CPartFacetIterator
  17. //            Iterates through all the facets of your part for a specific
  18. //            presentation. If kNoPresentation is used, all the facets are returned.
  19. //
  20. //        - FW_CPartEmbeddedFrameIterator
  21. //            This an iterator requiered by OpenDoc. It iterates through all the embedded frames
  22. //            of the specified display frames.
  23. //
  24.  
  25. #ifndef FWPRTITE_H
  26. #define FWPRTITE_H
  27.  
  28. #ifndef FWSTDDEF_H
  29. #include "FWStdDef.h"
  30. #endif
  31.  
  32. #ifndef FWEXCLIB_H
  33. #include "FWExcLib.h"
  34. #endif
  35.  
  36. #ifndef FWPARTNG_H
  37. #include "FWPartng.h"
  38. #endif
  39.  
  40. #ifndef FWPRESEN_H
  41. #include "FWPresen.h"
  42. #endif
  43.  
  44. #ifndef FWPROXY_H
  45. #include "FWProxy.h"
  46. #endif
  47.  
  48. #ifndef FWPART_H
  49. #include "FWPart.h"
  50. #endif
  51.  
  52. // ----- ODUtil -----
  53.  
  54. #ifndef FWORDCOL_H
  55. #include "FWOrdCol.h"
  56. #endif
  57.  
  58. // ----- OpenDoc Includes -----
  59.  
  60. #ifndef FWODTYPS_H
  61. #include "FWODTyps.h"
  62. #endif
  63.  
  64. //========================================================================================
  65. //    Forward Declarations
  66. //========================================================================================
  67.  
  68. class FW_CPart;
  69. class FW_CFrame;
  70. class FW_CEmbeddingFrame;
  71. class ODFrame;
  72. class FW_CPartFrameIterator;
  73. class FW_CPresentationFrameIterator;
  74. class FW_CPartPresentationIterator;
  75. class FW_CProxyFrame;
  76. class FW_CEmbeddingPart;
  77. class FW_CProxyEmbeddedFrameIterator;
  78. class FW_CProxyProxyFrameIterator;
  79.  
  80. //========================================================================================
  81. //    class FW_CPartPresentationIterator
  82. //========================================================================================
  83.  
  84. class FW_CPartPresentationIterator : public FW_TOrderedCollectionIterator<FW_CPresentation>
  85. {
  86. public:
  87.     FW_DECLARE_AUTO(FW_CPartPresentationIterator)
  88.  
  89.     FW_CPartPresentationIterator(const FW_CPart* part);
  90.     ~FW_CPartPresentationIterator();
  91. };
  92.  
  93. //========================================================================================
  94. //    class FW_CPartFrameIterator
  95. //========================================================================================
  96.  
  97. class FW_CPartFrameIterator
  98. {
  99. public:
  100.     FW_DECLARE_AUTO(FW_CPartFrameIterator)
  101.  
  102.     FW_CPartFrameIterator(Environment* ev, const FW_CPart* part);
  103.     ~FW_CPartFrameIterator();
  104.  
  105.     FW_CFrame*            First(Environment* ev);
  106.     FW_CFrame*            Next(Environment* ev);
  107.     FW_CFrame*            Last(Environment* ev);
  108.     FW_CFrame*            Previous(Environment* ev);
  109.     FW_Boolean            IsNotComplete(Environment*)
  110.                             {return fCurrentFrame != NULL;}
  111.  
  112. protected:
  113.     FW_CFrame*            PrivFirstFrame(Environment* ev, FW_CPresentation* presentation);
  114.     FW_CFrame*            PrivLastFrame(Environment* ev, FW_CPresentation* presentation);
  115.         
  116. private:
  117.     FW_CFrame*                        fCurrentFrame;
  118.     FW_CPartPresentationIterator    fPresentationIterator;
  119.     FW_CPresentationFrameIterator*    fFrameIterator;
  120. };
  121.  
  122. //========================================================================================
  123. //    class FW_CPartProxyIterator
  124. //========================================================================================
  125.  
  126. class FW_CPartProxyIterator : public FW_TOrderedCollectionIterator<FW_MProxy>
  127. {
  128. public:
  129.     FW_DECLARE_AUTO(FW_CPartProxyIterator)
  130.  
  131.     FW_CPartProxyIterator(const FW_CEmbeddingPart* part);
  132.     ~FW_CPartProxyIterator();
  133. };
  134.  
  135. //========================================================================================
  136. //    class FW_CPartProxyFrameIterator
  137. //========================================================================================
  138.  
  139. class FW_CPartProxyFrameIterator
  140. {
  141. public:
  142.     FW_DECLARE_AUTO(FW_CPartProxyFrameIterator)
  143.  
  144.     FW_CPartProxyFrameIterator(const FW_CEmbeddingPart* part);
  145.     ~FW_CPartProxyFrameIterator();
  146.  
  147.     FW_CProxyFrame*        First();
  148.     FW_CProxyFrame*        Next();
  149.     FW_CProxyFrame*        Last();
  150.     FW_CProxyFrame*        Previous();
  151.     FW_Boolean            IsNotComplete()
  152.                             {return fCurrentFrame != NULL;}
  153.                             
  154. protected:
  155.     FW_CProxyFrame*        PrivFirstFrame(FW_MProxy* proxy);
  156.     FW_CProxyFrame*        PrivLastFrame(FW_MProxy* proxy);
  157.         
  158. private:
  159.     FW_CProxyFrame*                    fCurrentFrame;
  160.     FW_CPartProxyIterator             fProxyIterator;
  161.     FW_CProxyProxyFrameIterator*     fProxyFrameIterator;
  162. };
  163.  
  164. //========================================================================================
  165. //    class FW_CPartEmbeddedFrameIterator
  166. //========================================================================================
  167.  
  168. class FW_CPartEmbeddedFrameIterator
  169. {
  170. public:
  171.     FW_DECLARE_AUTO(FW_CPartEmbeddedFrameIterator)
  172.  
  173.     FW_CPartEmbeddedFrameIterator(Environment* ev, const FW_CEmbeddingPart* part, FW_CEmbeddingFrame* frame = NULL);
  174.     ~FW_CPartEmbeddedFrameIterator();
  175.  
  176.     ODFrame*            First(Environment* ev);
  177.     ODFrame*            Next(Environment* ev);
  178.     ODFrame*            Last(Environment* ev);
  179.     ODFrame*            Previous(Environment* ev);
  180.     FW_Boolean            IsNotComplete(Environment*)
  181.                             {return fCurrentFrame != NULL;}
  182.  
  183. protected:
  184.     ODFrame*            PrivFirstFrame(Environment* ev, FW_MProxy* proxy);
  185.     ODFrame*            PrivLastFrame(Environment* ev, FW_MProxy* proxy);
  186.         
  187. private:
  188.     ODFrame*                        fCurrentFrame;
  189.     FW_CPartProxyIterator             fProxyIterator;
  190.     FW_CProxyEmbeddedFrameIterator* fEmbeddedFrameIterator;
  191.     FW_CEmbeddingFrame*                fEmbeddingFrame;
  192. };
  193.  
  194.  
  195. #endif